/*计算某年某月有多少天，输入两个整数表示年和月，输出一个整数，即该月的天数*/
#include <stdio.h>

int main(void) {
    int year, month;
    printf("Enter year: ");
    scanf("%d", &year);
    printf("Enter month: ");
    scanf("%d", &month);
    if (month == 2) {
        if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0)
            printf("29 days\n");
        else
            printf("28 days\n");
    } else if (month == 4 || month == 6 || month == 9 || month == 11)
        printf("30 days\n");
    else
        printf("31 days\n");
    return 0;

}

